public class Demo5 {

    public static void main(String[] args) {
        try {
            int a = 20;
            int b = 10;
            if (a > b) {
                throw new Exception("a 大于 b");
            }
//            if(condition2) {
//                throw new Exception("some error");
//            }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            release();
        }
    }
    public static void release () {
        System.out.println("release释放资源");
    }
}
